#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
// mod ImageLoader;  
use slint::SharedString;
use std::error::Error;
slint::include_modules!();

fn main()-> Result<(), Box<dyn std::error::Error>> {
    let ui=Dialog::new()?;
    ui.run()?;

    // let path = String::from("resource/241552_01531_Zprojection.tif");
    // let loader = ImageLoader::ImageLoader{path};

    // let image= loader.load()?;
    
    // println!("image width:{}",image.width());
    // let width = image.width();
    // let height = image.height();
    // let downsampledImage=image::imageops::resize(&image.clone().into_luma16(), width/10, height/10 , image::imageops::FilterType::Triangle);
    // downsampledImage.save_with_format("resource/downsampled.tif",image::ImageFormat::Tiff);
    // // println!("Image read successfully: {:?}", image);
    Ok(())
    
}
